package com.tentative.competition.schedule.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tentative.competition.common.model.schedule.param.ScheduleNewsInfoAddParam;
import com.tentative.competition.common.model.schedule.param.ScheduleWorkSearchParam;
import com.tentative.competition.common.model.schedule.param.WorksGradeListParam;
import com.tentative.competition.common.model.schedule.resp.HomePreviousWorksResp;
import com.tentative.competition.common.model.schedule.resp.PreviousWorksResp;
import com.tentative.competition.common.model.schedule.resp.ScheduleNewsInfoResp;
import com.tentative.competition.common.model.schedule.resp.WorksGradeListResp;
import com.tentative.competition.schedule.domain.ScheduleWorks;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 参赛作品信息表 Mapper 接口
 * </p>
 *
 * @author SmileH
 * @since 2023-06-22
 */
public interface ScheduleWorksMapper extends BaseMapper<ScheduleWorks> {

    IPage<ScheduleWorks> pageList(@Param("param") ScheduleWorkSearchParam param, Page page);

    List<PreviousWorksResp> getPreviousWorks(@Param("scheduleId") Long scheduleId);

    List<HomePreviousWorksResp> getScheduleWorks(@Param("worksName") String worksName,
                                                 @Param("scheduleId") Long scheduleId);

    IPage<WorksGradeListResp> selectWorksGradeList(@Param("param") WorksGradeListParam param,Page page);

}
